package vn.com.epi.sevlet;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import vn.com.epi.web.Application;


@WebServlet("/view-cached-data.html")
public class ViewCachedDataServlet extends HttpServlet {

    private static final long serialVersionUID = 1L;

    public ViewCachedDataServlet() {
        super();
    }

    @Override
    protected void doGet(HttpServletRequest request, HttpServletResponse response)
            throws ServletException, IOException {
        request.setAttribute("cache", Application.getLogBuffer().toList());
        request.getRequestDispatcher("/WEB-INF/jsp/viewcacheddata.jsp").forward(request, response);
    }

}
